package com.example.serviceheadlines.feign;

import com.example.serviceheadlines.service.IHeadlinesThumpService;
import com.tangyuan.feignapis.headlines.IHeadlinesThumpFeignClient;
import com.tangyuan.model.HeadlinesThump;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class HeadlinesThumpFeignClient implements IHeadlinesThumpFeignClient {

    @Autowired
    private IHeadlinesThumpService headersThumpService;

    @GetMapping("/feignApi/headlinesThump/getHeadlinesThumpOne/{userId}/{articleId}")
    @Override
    public HeadlinesThump getHeadlinesThumpOne(@PathVariable Long userId, @PathVariable Integer articleId) {
        return headersThumpService.getHeadlinesThumpOne(userId,articleId);
    }
}
